﻿using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;

namespace ZKTEcoPush.Models
{
    public class AttendanceQuery
    {
        // ${Required}表示客户端的序列号
        [Required]
        [FromQuery(Name = "SN")]
        public string SN { get; set; } = string.Empty;

        // ATTLOG：${Required}表示上传的数据为考勤记录
        [Required]
        [FromQuery(Name = "table")]
        public string Table { get; set; } = string.Empty;

        // ${Optional}表示考勤记录上传到服务器的最新时间戳(
        [FromQuery(Name = "Stamp")]
        public string Stamp { get; set; } = string.Empty;
    }

    public class AttendanceDataRecord
    {
        public string Id { get; set; } = string.Empty; // 数据 ID
        public DateTime Timestamp { get; set; } // 时间戳
        public string Value1 { get; set; } = string.Empty; // 第一个值
        public string Value2 { get; set; } = string.Empty; // 第二个值
        public string Value3 { get; set; } = string.Empty; // 第三个值
        public string Value4 { get; set; } = string.Empty; // 第四个值
        public string Value5 { get; set; } = string.Empty; // 第五个值
    }
}
